﻿@{
    ViewBag.Title = "修改密码 - " + ViewBag.DomainTitle;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="layui-fluid ptop20">
    <form class="layui-form" id="dataForm">
        <div class="layui-form-item">
            <label class="layui-form-label">原密码</label>
            <div class="layui-input-block">
                <input type="password" name="oldPassword" placeholder="原密码" class="layui-input w250">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">新密码</label>
            <div class="layui-input-block">
                <input type="password" name="newPassword1" placeholder="新密码" class="layui-input w250">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">重复新密码</label>
            <div class="layui-input-block">
                <input type="password" name="newPassword2" placeholder="重复新密码" class="layui-input w250">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <a class="layui-btn" onclick="javascript: { updatePassword(); }">提交</a>
            </div>
        </div>
    </form>
</div>

@Html.Partial("~/Views/Shared/_Script.cshtml")

<script>
    function updatePassword() {
        var data = $('#dataForm').getForm();
        var loading = layer.load();
        $.post('/Home/AjaxUpdatePassword', data, function (result) {
            layer.close(loading);
            layer.alert('修改成功');
        });

    };
</script>